/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.hiddendanger.mapper;

import com.koron.hiddendanger.domain.ChecklistEntryReference;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ChecklistEntryReferenceMapper {
    /**
     * 根据主键查询检查记录参考的检查表详情
     * @param id
     * @return
     */
    ChecklistEntryReference queryOne(@Param("id") String id);

    /**
     * 查询某个检查记录下使用了的检查表列表
     * @param checkRecordId
     * @param start
     * @param rows
     * @return
     */
    List<ChecklistEntryReference> queryByCheckRecordId(@Param("checkRecordId") String checkRecordId,@Param("start") Integer start,@Param("rows") Integer rows);

    /**
     * 统计某个检查记录使用的检查表数量
     * @param checkRecordId
     * @return
     */
    Integer countByCheckRecordId(@Param("checkRecordId") String checkRecordId);

    /**
     * 新增使用的检查表
     * @param bean
     * @return
     */
    Integer insert(@Param("bean") ChecklistEntryReference bean);

    /**
     * 修改使用的检查表
     * @param bean
     * @return
     */
    Integer update(@Param("bean") ChecklistEntryReference bean);

    /**
     * 删除使用的检查表
     * @param idList
     * @return
     */
    Integer deleteBatch(@Param("idList") List<String> idList);

    Integer deleteBatchByCheckId(@Param("checkRecordId") String checkRecordId);
}
